//
//  LTView.m
//  第九节作业
//
//  Created by dllo on 16/3/21.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "LTView.h"

@implementation LTView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)dealloc{
    [_labelOfLeft release];
    [_textFieldOfRight release];
    [super dealloc];
}
-(void)createSubViewsWithFrame:(CGRect)frame{
    self.labelOfLeft = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, frame.size.width / 4, frame.size.height)];
    [self addSubview:self.labelOfLeft];
    self.labelOfLeft.font = [UIFont systemFontOfSize:25];
    [_labelOfLeft release];
    
    self.textFieldOfRight = [[UITextField alloc]initWithFrame:CGRectMake(frame.size.width / 4, 0, frame.size.width * 3 / 4, frame.size.height)];
    [self addSubview:self.textFieldOfRight];
    [_textFieldOfRight release];
    
    self.textFieldOfRight.borderStyle = 2.5;

}

- (instancetype)initWithFrame:(CGRect)frame WithText:(NSString *)text placeHolder:(NSString *)placeHolder{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViewsWithFrame:frame];
        self.labelOfLeft.text = text;
        self.textFieldOfRight .placeholder = placeHolder;
        
    }
    return self;
    
}


@end
